package com.way.demo.comm;

import lombok.Getter;
import lombok.Setter;

/**
 * @author lipingwei
 * @create 2021-01-21 15:16
 */
@Getter
@Setter
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = 4435166930781630861L;

    private String code;
    private String msg;

    public BusinessException(String msg) {
        super(msg);
        this.msg = msg;
        this.code = "-1";
    }

    public BusinessException(String msg, Throwable cause) {
        super(msg, cause);
        this.msg = msg;
        this.code = "-1";
    }

    public BusinessException(String code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public BusinessException(String code, String msg, Throwable cause) {
        super(msg, cause);
        this.code = code;
        this.msg = msg;
    }

}
